package com.qf.health.service.Impl;


import com.qf.health.entity.Health;
import com.qf.health.mapper.HealthMapper;
import com.qf.health.service.HealthService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/*2021/10/6*/public class HealthServiceImpl implements HealthService {
    @Autowired
    HealthMapper healthMapper;
    @Override
    public List<Health> selectPage() {
        List<Health> health =null;

        health = healthMapper.selectPage();
        return health;
    }

    @Override
    public Integer addHealth(Health health) {
        Integer result=0;
            result= healthMapper.insertHealth(health);
//        int i=10/0;
        return result;
    }

    @Override
    public Integer updateHealth(Health health) {
        Integer result=0;
            result= healthMapper.updateHealth(health);

        return result;
    }

    @Override
    public Health selectHealthById(int id) {
        return healthMapper.selectHealthById(id);
    }

    @Override
    public Integer deleteHealthById(Integer id) {
        Integer result=0;
            result= healthMapper.deleteHealthById(id);
        return result;
    }
}
